<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<a class="menu-toggler" id="menu-toggler" href="#">
    <span class="menu-text"></span>
</a>

<div class="sidebar" id="sidebar">
    <script type="text/javascript">
        try {
            ace.settings.check('sidebar', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="sidebar-shortcuts" id="sidebar-shortcuts">
        <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
            <button class="btn btn-success">
                <i class="icon-signal"></i>
            </button>

            <button class="btn btn-info">
                <i class="icon-pencil"></i>
            </button>

            <button class="btn btn-warning">
                <i class="icon-group"></i>
            </button>

            <button class="btn btn-danger">
                <i class="icon-cogs"></i>
            </button>
        </div>

        <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
            <span class="btn btn-success"></span>

            <span class="btn btn-info"></span>

            <span class="btn btn-warning"></span>

            <span class="btn btn-danger"></span>
        </div>
    </div>
    <!-- #sidebar-shortcuts -->

    <ul class="nav nav-list">
        <div class="nav nav-list">
            <c:forEach items="${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.resources}" var="res">
                <%--<s:authorize ifAnyGranted="${res.roleCodes}">--%>
                <li>
                    <a href="${ctx}${res.resUrl}" ${res.hasSub ? 'class="dropdown-toggle"' : ''}>
                        <i class="${res.iconCss}"></i>
                        <span class="menu-text">${res.resName}</span>
                        <c:if test="${res.hasSub}">
                            <b class="arrow icon-angle-down"></b>
                        </c:if>
                    </a>
                    <c:if test="${res.hasSub}">
                        <ul class="submenu">
                            <c:forEach items="${res.subResources}" var="subRes">
                            <li>
                                <a href="${ctx}${subRes.resUrl}">
                                    <i class="${subRes.iconCss}"></i>
                                    ${subRes.resName}
                                    <c:if test="${subRes.hasSub}">
                                        <b class="arrow icon-angle-down"></b>
                                    </c:if>
                                </a>
                                <c:if test="${subRes.hasSub}">
                                    <ul class="submenu" style="display: block;">
                                        <c:forEach items="${subRes.subResources}" var="thirdRes">
                                            <li>
                                                <a href="${ctx}/${thirdRes.resUrl}">
                                                    <i class="${thirdRes.iconCss}"></i>
                                                        ${thirdRes.resName}
                                                </a>
                                            </li>
                                        </c:forEach>
                                    </ul>
                                </c:if>
                            </li>
                            </c:forEach>
                        </ul>
                    </c:if>
                </li>
                <%--</s:authorize>--%>
            </c:forEach> 
            <%--<li <c:if test="${sessionScope.activeMenu eq 'system'}">class="open"</c:if>>--%>
                <%--<a href="#" class="dropdown-toggle">--%>
                    <%--<i class="icon-text-width"></i>--%>
                    <%--<span class="menu-text">系统管理</span>--%>
                <%--</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${sessionScope.activeMenu eq 'orderList'}">class="open"</c:if>>--%>
                <%--<a href="#" class="dropdown-toggle">--%>
                    <%--<i class="icon-list-alt"></i>--%>
                    <%--<span class="menu-text">房间管理</span>--%>
                    <%--<b class="arrow icon-angle-down"></b>--%>
                <%--</a>--%>
                <%--<ul class="submenu" <c:if test="${sessionScope.activeMenu eq 'orderList'}">style="display: block;"</c:if>>--%>
                    <%--<li <c:if test="${sessionScope.activeMenu eq 'orderList'}">class="active"</c:if>>--%>
                        <%--<a href="${ctx}/room/attribute_edit">--%>
                            <%--<i class="icon-double-angle-right"></i>--%>
                            <%--房间属性配置--%>
                        <%--</a>--%>
                    <%--</li>--%>
                    <%--<li <c:if test="${sessionScope.activeMenu eq 'orderList'}">class="active"</c:if>>--%>
                        <%--<a href="${ctx}/room/create">--%>
                            <%--<i class="icon-double-angle-right"></i>--%>
                            <%--房型管理--%>
                        <%--</a>--%>
                    <%--</li>--%>
                    <%--<li <c:if test="${sessionScope.activeMenu eq 'orderList'}">class="active"</c:if>>--%>
                        <%--<a href="${ctx}/room/price_edit">--%>
                            <%--<i class="icon-double-angle-right"></i>--%>
                            <%--房价维护--%>
                        <%--</a>--%>
                    <%--</li>--%>
                <%--</ul>--%>
            <%--</li>--%>

        </div>
    </ul>
    <!-- /.nav-list -->

    <div class="sidebar-collapse" id="sidebar-collapse">
        <i class="icon-double-angle-left" data-icon1="icon-double-angle-left"
           data-icon2="icon-double-angle-right"></i>
    </div>

    <script type="text/javascript">
        try {
            ace.settings.check('sidebar', 'collapsed')
        } catch (e) {
        }
    </script>
</div>
<div id="updatePwd_modal" class="modal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">修改密码</div>
            <div class="modal-body">
                <div class="form-horizontal" role="form" id="updatePwd_form">
                    <input type="hidden" name="id"/>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right">原始密码<span class="red">*</span></label>
                        <div class="col-sm-9">
                            <input type="password" name="oldPwd" placeholder="请输入原始密码" class="col-xs-8 col-sm-8">
                            <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right"
                                  data-content="密码为长度为6-20个字符" title="" data-original-title="">?</span>
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right">新密码<span class="red">*</span></label>
                        <div class="col-sm-9">
                            <input type="password" name="newPwd" placeholder="请输入新密码" class="col-xs-8 col-sm-8">
                            <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right"
                                  data-content="密码为长度为6-20个字符" title="" data-original-title="">?</span>
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right">确认密码<span class="red">*</span></label>
                        <div class="col-sm-9">
                            <input type="password" name="confirmPwd" placeholder="请再次输入新密码" class="col-xs-8 col-sm-8">
                            <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right"
                                  data-content="密码为长度为6-20个字符" title="" data-original-title="">?</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success btn-sm" id="updatePwd_btn">
                    <i class="icon-save"></i>
                    保存
                </button>
                <button class="btn btn-danger btn-sm" data-dismiss="modal">
                    <i class="icon-remove"></i>
                    取消
                </button>
            </div>
        </div>
    </div>
</div>